home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / kunarc.z / kunarc
Text File  |  1998-10-30  |  13KB  |  331 lines

  1.  
  2.  
  3.  
  4.      KKKKUUUUNNNNAAAARRRRCCCC((((1111))))      KKKK----AAAASSSShhhhaaaarrrreeee bbbbyyyy XXXXiiiinnnneeeetttt ((((11117777 JJJJaaaannnn 1111999999998888 8888....7777))))      KKKKUUUUNNNNAAAARRRRCCCC((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           kunarc, karc -  K-AShare
  10.           AppleSingle/AppleDouble/BinHex/MacBinary converter
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.           kkkkuuuunnnnaaaarrrrcccc [ -_t_r_U ] [ -_f _o_u_t_f_i_l_e ] _i_n_f_i_l_e...
  14.           kkkkaaaarrrrcccc [ -_t_r_A_B_C_D_M ] [ -_f _o_u_t_f_i_l_e ] _i_n_f_i_l_e...
  15.  
  16.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.           These utility programs let the user convert between various
  18.           Macintosh archival formats and the K-AShare file format.
  19.           The supported archive formats are AppleSingle, AppleDouble,
  20.           BinHex, CAP-AUFS 3.0, Helios Ethershare, MacBinary, TOPS
  21.           (version 2 or later), and IPT uShare 4.1.  These formats are
  22.           used to encode Macintosh specific information (file type and
  23.           creator, resource fork etc.)  into one or more files that
  24.           can be stored on non-Macintosh file systems. BinHex also
  25.           encodes files into ASCII, so that they can be transferred
  26.           via e-mail (i.e. it is similar to _u_u_e_n_c_o_d_e(_1) ). AppleDouble
  27.           is used by some other AppleShare emulators to store
  28.           Macintosh files on Unix filesystems (e.g. A/UX, GatorShare,
  29.           and NFS/Share).  AppleSingle is used by AppleLink to attach
  30.           files to e-mail messages.
  31.  
  32.           _K_a_r_c creates archive files from K-AShare files, _k_u_n_a_r_c
  33.           creates K-AShare files from archive files.
  34.  
  35.           BinHex files usually have a .hqx file suffix.  AppleDouble
  36.           format uses two files. For instance, for a file named foo,
  37.           only the macintosh data fork will be stored in the file
  38.           named foo. The resource fork, file creator, type,
  39.           modification date, etc. are stored in a file named %foo.
  40.           _K_u_n_a_r_c should be run on the file that starts with the '%'
  41.           character.
  42.  
  43.           Helios Ethershare and IPT uShare files have a .rsrc
  44.           subdirectory which contains the resource fork of the file
  45.           contained in the upper directory. Helios Ethershare files
  46.           with no dataforks only have an entry in this .rsrc
  47.           subdirectory.  Using _k_u_n_a_r_c on IPT uShare requires using the
  48.           -U option.  _k_u_n_a_r_c should be run given the name of the .rsrc
  49.           subdirectory, and will then convert all files in the
  50.           subdirectory.  A side effect of running _k_u_n_a_r_c on Helios
  51.           Ethershare and IPT uShare files is that filenames with 8 bit
  52.           characters (accents  and the like) will get renamed using
  53.           Xinet's 8 bit character mapping.
  54.  
  55.           Helios EtherShare and IPT uShare file systems should also
  56.           have their directory names changed using _k_u_n_a_r_c with the -h
  57.           option.  See the examples.
  58.  
  59.           MacBinary files usually have a .bin suffix.  The _k_u_n_a_r_c
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 3/26/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      KKKKUUUUNNNNAAAARRRRCCCC((((1111))))      KKKK----AAAASSSShhhhaaaarrrreeee bbbbyyyy XXXXiiiinnnneeeetttt ((((11117777 JJJJaaaannnn 1111999999998888 8888....7777))))      KKKKUUUUNNNNAAAARRRRCCCC((((1111))))
  71.  
  72.  
  73.  
  74.           utility supports BinHex 4.0 and MacBinary I & II files. Note
  75.           that AppleSingle files received from AppleLink via UNIX mail
  76.           must be run through _u_u_d_e_c_o_d_e first.  _K_u_n_a_r_c does support
  77.           compressed AppleLink enclosures, but the AppleLink software
  78.           or Stuffit Expander must be used to uncompress the resulting
  79.           file.
  80.  
  81.           _K_u_n_a_r_c will use the file name recorded in the archive file,
  82.           for every _i_n_f_i_l_e that is not preceded by an _o_u_t_f_i_l_e
  83.           argument.
  84.  
  85.           If you don't use the remove _i_n_f_i_l_e option with _k_a_r_c, you
  86.           must specify an _o_u_t_f_i_l_e.
  87.  
  88.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  89.           ----ffff   Use the next argument as the name of _o_u_t_f_i_l_e. If
  90.                _o_u_t_f_i_l_e does not contain a path name, the current
  91.                working directory will be used (rather than any path
  92.                name that may be contained in _i_n_f_i_l_e). If this option
  93.                is  omitted, we try to determine the output filename
  94.                from _i_n_f_i_l_e (and _o_u_t_f_i_l_e will be placed in the same
  95.                directory as _i_n_f_i_l_e). If _o_u_t_f_i_l_e is given as `-', karc
  96.                writes to the standard output.
  97.  
  98.           ----rrrr   Remove _i_n_f_i_l_e after converting it.
  99.  
  100.           ----hhhh   Convert _i_n_f_i_l_e Helios EtherShare or IPT uShare
  101.                directory names, and all subdirectory names, to use
  102.                Xinet's 8 bit character encoding scheme.  This option
  103.                should be run by itself either before or after
  104.                converting all the files from Helios EtherShare or IPT
  105.                uShare format to Xinet format.  See the examples below.
  106.  
  107.           ----tttt   Set the tolerant flag. When this flag is set, kunarc
  108.                tries to handle apparently invalid files. This is
  109.                useful for handling files created by programs that do
  110.                not exactly follow the appropriate file format
  111.                standard.
  112.  
  113.           ----AAAA   Create an AppleSingle archive.
  114.  
  115.           ----BBBB   Create a BinHex archive.
  116.  
  117.           ----CCCC   Create a CAP/AUFS version 3 archive.
  118.  
  119.           ----DDDD   Create an AppleDouble archive.
  120.  
  121.           ----MMMM   Create a MacBinary archive.
  122.  
  123.           ----UUUU   Assume input infile is a IPT uShare file (uShare files
  124.                are not automatically recognized as they lack an easy
  125.                "magic" number to recognize).
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 3/26/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      KKKKUUUUNNNNAAAARRRRCCCC((((1111))))      KKKK----AAAASSSShhhhaaaarrrreeee bbbbyyyy XXXXiiiinnnneeeetttt ((((11117777 JJJJaaaannnn 1111999999998888 8888....7777))))      KKKKUUUUNNNNAAAARRRRCCCC((((1111))))
  137.  
  138.  
  139.  
  140.           iiiinnnnffffiiiilllleeee
  141.                This may be a directory (in which case all regular
  142.                files in _i_n_f_i_l_e are processed).
  143.  
  144.      FFFFIIIILLLLEEEESSSS
  145.            ./.HSancillary               File for additional file
  146.                                         information needed by
  147.                                         Macintosh.
  148.  
  149.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  150.           _K_u_n_a_r_c can be run in batch mode in conjunction with _f_i_n_d.
  151.           (You should run _k_u_n_a_r_c as root if you use this method).  If
  152.           you are doing this, we suggest piping stdout into a log file
  153.           so you can look at stderr for any errors. If you don't have
  154.           a backup of your filesystem, we suggest you don't use the
  155.           remove option if you use _k_u_n_a_r_c in batch mode. Instead, you
  156.           can use another _f_i_n_d command to remove the archive files
  157.           once _k_u_n_a_r_c has been run successfully. (See examples below).
  158.  
  159.           Convert all AppleDouble files in the directory tree rooted
  160.           at /_u_s_r/_m_o_u_n_t to K-AShare format:
  161.  
  162.                find /usr/mount -name "%*" -exec kunarc {} \;
  163.  
  164.           Convert all A/UX files in the directory tree rooted at
  165.           /_u_s_r/_m_o_u_n_t to K-AShare format:
  166.  
  167.                find /usr/mount -type d -name ".AppleDouble" -prune -exec kunarc {} \;
  168.  
  169.           If this succeeds without incident, use the following commands to remove
  170.           the A/UX directories (which will no longer be necessary).
  171.  
  172.                find . -name ".AppleDouble" -prune -exec rm -r {} \;
  173.  
  174.           Convert all CAP-AUFS files in the directory tree rooted at
  175.           /_u_s_r/_m_o_u_n_t to K-AShare format:
  176.  
  177.                find /usr/mount -type d -name ".finderinfo" -prune -exec kunarc {} \;
  178.  
  179.           If this succeeds without incident, use the following commands to remove
  180.           the CAP directories (which will no longer be necessary).
  181.  
  182.                find . -name ".finderinfo" -prune -exec rm -r {} \;
  183.                find . -name ".resource" -prune -exec rm -r {} \;
  184.  
  185.           Convert all TOPS files in the directory tree rooted at
  186.           /_u_s_r/_m_o_u_n_t to K-AShare format:
  187.  
  188.                 find . -name ".rsrc" -prune -o -type f -exec kunarc {} \;
  189.  
  190.           If this succeeds without incident, use the following commands to remove
  191.           the TOPS directories (which will no longer be necessary).
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 3/26/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      KKKKUUUUNNNNAAAARRRRCCCC((((1111))))      KKKK----AAAASSSShhhhaaaarrrreeee bbbbyyyy XXXXiiiinnnneeeetttt ((((11117777 JJJJaaaannnn 1111999999998888 8888....7777))))      KKKKUUUUNNNNAAAARRRRCCCC((((1111))))
  203.  
  204.  
  205.  
  206.                find . -name ".rsrc" -exec rm -rf {} \;
  207.  
  208.           Convert all Helios EtherShare files in the directory tree
  209.           rooted at /_u_s_r/_m_o_u_n_t to K-AShare format:
  210.  
  211.                 find . -name ".rsrc" -type d -exec kunarc {} \;
  212.  
  213.           Convert all IPT uShare files in the directory tree rooted at
  214.           /_u_s_r/_m_o_u_n_t
  215.           to K-AShare format:
  216.  
  217.                 find . -name ".rsrc" -type d -exec kunarc -U {} \;
  218.  
  219.           You also need to change the directory names from Helios'
  220.           or IPT's 8 bit character encoding scheme to Xinet's encoding scheme.
  221.           This has to be done as a separate step as the find command gets confused
  222.           when directories being searched change names.  Run kunarc with
  223.           the -h flag at the root of the Helios EtherShare or IPT uShare
  224.           directory tree:
  225.  
  226.                kunarc -h /usr/mount
  227.  
  228.           If all this succeeds without incident, use the following commands
  229.           to remove the EtherShare or uShare directories (which will no longer
  230.           be necessary).
  231.  
  232.                find . -name ".rsrc" -type d -exec rm -rf {} \;
  233.  
  234.           Convert all K-AShare files in the directory tree rooted at
  235.           /_u_s_r/_m_o_u_n_t to AppleDouble format (type as one line):
  236.  
  237.                find /usr/mount \( -type d -name ".HSResource" -prune \)
  238.                     -o \( -name ".HSancillary" \)
  239.                     -o -type f -exec karc -D -r {} \;
  240.  
  241.           Convert _A_M_a_c_F_i_l_e into _u_u, which can be appended to messages
  242.           sent to AppleLink accounts via the Internet AppleLink
  243.           gateway (e.g. XINET@applelink.apple.com).  AppleLink will
  244.           convert the enclosure back to the original Macintosh file.
  245.  
  246.                karc -A -f - AMacFile | uuencode AMacFile >! uu
  247.  
  248.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  249.           _K-_A_S_h_a_r_e _A_d_m_i_n_i_s_t_r_a_t_o_r'_s _G_u_i_d_e
  250.  
  251.      BBBBUUUUGGGGSSSS
  252.           The tolerant flag does not always work.
  253.  
  254.           If _k_u_n_a_r_c is used in conjunction with _f_i_n_d(_1) and the remove
  255.           flag is on, _f_i_n_d may be confused when _k_u_n_a_r_c deletes files.
  256.           This will result in spurious error messages (usually
  257.           something like "cannot stat <filename>"), which may be
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 3/26/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      KKKKUUUUNNNNAAAARRRRCCCC((((1111))))      KKKK----AAAASSSShhhhaaaarrrreeee bbbbyyyy XXXXiiiinnnneeeetttt ((((11117777 JJJJaaaannnn 1111999999998888 8888....7777))))      KKKKUUUUNNNNAAAARRRRCCCC((((1111))))
  269.  
  270.  
  271.  
  272.           ignored.
  273.  
  274.           _k_u_n_a_r_c doesnt do the right thing when given the dataforks
  275.           for Helios EtherShare and IPT uShare files.  Give it the
  276.           file in the .rsrc directories.
  277.  
  278.           _K_a_r_c supports only MacBinary, AppleSingle and AppleDouble.
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                                          (printed 3/26/98)
  328.  
  329.  
  330.  
  331.